package com.earl.user.config;

import com.earl.user.entity.po.Persion;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class PersionConfig {

    @Value("${person.username}")
    private String username;

    @Value("${person.age}")
    private Integer age;

    @Bean
    public Persion getPersion(){
        Persion persion = new Persion();
        persion.setUsername(username);
        persion.setAge(age);
        return persion;
    }
}
